<?php
class QSource_System_Helper_Helper { 
        static function getFileUrl($url)
		{
			$pattern = '/[^a-z0-9]+/i';
			$temp = preg_split($pattern,$url);
			$urlDir = '';
			if($temp!='')
			{
				$count = count($temp);
				if(strtolower($temp[0])=='com')
				{
					$urlDir = APPLICATION_PATH.'/../system/languages/'.strtolower($temp[0]).'/'.strtolower($temp[1]).'/'.strtolower($temp[2]).'/'.strtolower($temp[3]).'/';
				}
				else
				{
					if(strtolower($temp[0]='tem'))
					{
						
					}
				}
				
				$lang = Zend_Controller_Front::getInstance()->getRequest()->getParam('lang','');				
				if($lang=='')
				{
					$defaultlang = Administrator_Model_System::GetLanguagePagesDefault();
					$lang = $defaultlang['alias'];
				}
				$urlDir = $urlDir.''.$lang.'/'.strtolower($temp[$count-2]).'.ini';
				return $urlDir;
			}
				else
				return $url;
		}	
}